
@if ($paginator->hasPages())
<div class="pagination-container">
  <div class="pagination">
    @if(!$paginator->onFirstPage())<a href="@if ($paginator->onFirstPage()) javascript:; @else {{ $list_url->withPage($paginator->currentPage() - 1)->toString() }} @endif" class="icon-prev icon"></a>
    @endif
    @foreach ($elements as $element)
      {{-- "Three Dots" Separator --}}
      @if (is_string($element))<span>{{ $element }}</span>
      @endif
      @if (is_array($element))
        @foreach ($element as $page => $url)
          @if ($page == $paginator->currentPage())<a class="nub cur">{{ $page }}</a>
          @else<a href="{{ $list_url->withPage($page)->toString()}}" class="nub">{{ $page }}</a>
          @endif
        @endforeach
      @endif
    @endforeach
    @if($paginator->hasMorePages())<a href="@if($paginator->hasMorePages()){{$list_url->withPage($paginator->currentPage() + 1)->toString()}}@else javascript:; @endif" class="icon-next icon"></a>
    @endif
  </div>
</div>
@endif